package com.bestcem.xm.ticket.enums;

import lombok.Getter;
import lombok.ToString;

/**
 * 读优先枚举
 * @author jy.zhao
 * @version 1.0
 * @date 2021/10/26 15:16
 **/
@Getter
@ToString
public enum ReadPreferenceEnum {
    /**
     * 主库
     */
    PRIMARY(0, "主库"),

    /**
     * 从库优先
     */
    SECONDARY_PREFERRED(1, "从库优先");

    private final String name;

    private final Integer index;

    ReadPreferenceEnum(Integer index, String name) {
        this.name = name;
        this.index = index;
    }
}
